/**
 * Created with WebStorm.
 * @Author: panda
 * @Date: 2022-05-18 09:21
 * @Description: 视频相关类型定义
 */

// 视频相关类
// interface VideoCar {
//     id: number,
//     thumbnail: string,
//     title: string,
//     author: string,
//     createTime: string
// }

interface QueryParams {
  pageNum: number,
  pageSize: number,
  // categoryId: number
  hasMore: boolean
}

export class VideoList {
  // vidoes接收接口返回数据的data对象
  videos: any;
}

export class VideoSearch {
  datas: any = [];
  params: QueryParams = {
    pageNum: 0,
    pageSize: 0,
    // categoryId: 0,
    hasMore: false
  }
}
export interface HotTitle {
  id: string,
  title: string,
}

interface VideoModel {
  copyright: string,
  cover: string,
  createBy: string,
  createTime: string,
  detail: string,
  categoryId: number
  duration: number,
  id: number,
  likes: number,
  title: string,
  videoUrl: string,
  views: number,
  username: string,
  avatar: string
  videoSize: number
}

export class Video {
  video: VideoModel = {
    copyright: "",
    cover: "",
    createBy: "",
    createTime: "",
    categoryId: 0,
    detail: "",
    duration: 0,
    id: 0,
    likes: 0,
    title: "",
    videoUrl: "",
    views: 0,
    username: '',
    avatar: '',
    videoSize: 0,
  }
}
